package cn.tom.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
public class Cart {
    private Integer id;
    private XUser myUser;
    private Book book;
    private Integer num;
    private Double price;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date tcreate ;

    public Cart() {
        this.id = 0;
        this.myUser = new XUser();
        this.book = new Book();
        this.num = 0;
        this.price = 0.0;
    }

}
